<template>
  <div class="container" :style="{height: height, width: width}">
    <div class="content">
      <template v-if="isWork" class="main-area">
        <div class="progress">
          <div v-if="phase===1" class="cirlce">{{count}}</div>       
          <img v-if="phase===2" :style="{height: '326px', width: '232px'}" src="../assets/xiqi.png" alt="">
          <img v-if="phase===3" :style="{height: '326px', width: '176px'}" src="../assets/baochi.png" alt="">
          <img v-if="phase===4" :style="{height: '326px', width: '232px'}" src="../assets/huqi.png" alt="">
        </div>

        <div class="text">{{content}}</div>
        <div v-if="phase!==1" class="text">{{count}}</div>       

      </template>
      <template v-else>
        <div class="banner">肺健康智慧检测和训练系统</div>
      </template>
    </div>
  </div>
</template>
<script>
export default {
  name: 'Tips',
  props: {
    width: String,
    height: String,
    content: String,
    count: Number,
    textColor: String,
    isWork: Boolean,
    initNum:Number,
    imageSrc:String,
    phase:Number
  },

  computed:{
    percentage(){
      let percent = (this.initNum-this.count)/this.initNum*100
      return percent>100?100:percent
    }
  },
  methods:{
    format(){
      return this.count
    }
  }

}
</script>
<style scoped>
.progress{
  display: flex;
  justify-content: center;
}
  .cirlce{
      display: flex;
  justify-content: center;
  align-items: center;
    width: 260px;
    height: 260px;
    background-image: url('../assets/circle.png');
    font-size: 43px;
font-family: DIN-Bold, DIN;
font-weight: bold;
color: #007AFF;
line-height: 53px;
  }
  .text{
    margin-top: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
    font-size: 36px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #333333;
    line-height: 50px;
  }
  .main-area{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .banner {
    color: #009FC7;
    font-size: 60px;
  }
  .content {
    height: 100%;
    text-align: center;
    font-size: 30px;
    line-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .el-progress-circle{
    display: flex;
    justify-content: center;
  }
  .container{
    background: #fff;
  }
</style>
